package router

import (
	"jgt-wallet/src/context"
	"jgt-wallet/src/controller/dev"

	"github.com/facebookgo/inject"
	"github.com/teambition/gear"
)

// DevKeyMap 密钥路由映射
func DevKeyMap(g *inject.Graph, r *gear.Router) {
	a := new(dev.Key)
	err := g.Provide(&inject.Object{Value: a})
	if err != nil {
		panic(err)
	}

	r.Get("/key/check", context.WrapContext(a.CheckKey))
	r.Get("/key/make", context.WrapContext(a.MakeKey))
}
